<?php
	require_once 'gameAPI.php' ;
		
	$user_ids = implode(',', get_all_user_ids());	
?>

<div id="fb-root"></div>
<script>

var user_ids = [<?php echo $user_ids; ?>];

  window.fbAsyncInit = function() {
    FB.init({
      appId  : '271211432894561',
      status : true, // check login status
      cookie : true, // enable cookies to allow the server to access the session
      xfbml  : true  // parse XFBML
    });
	
	FB.ui({method: 'apprequests', 
		message: "Dear Sir, you are so sexy!", 
		data: 'tracking information for the user',
		exclude_ids: user_ids
		});
  };

  (function() {
    var e = document.createElement('script');
    e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
    e.async = true;
    document.getElementById('fb-root').appendChild(e);
  }());
</script>